package com.mall.autoconfig;

import com.mall.autoconfig.properties.OssProperties;
import com.mall.autoconfig.template.OssTemplate;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(
        {
                OssProperties.class //oss访问用到的配置类
        }
)
public class MallAutoConfiguration {
    @Bean
    public OssTemplate ossTemplate(OssProperties ossProperties) {
        return new OssTemplate(ossProperties);
    }

}
